﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;

namespace coreEntityFramework.Controllers
{
    [Produces("application/json")]
    [Route("api/Test")]
    public class TestController : Controller
    {
        //Trace<Debug<Information<Warning<Error<Critical<None
        private readonly ILogger<TestController> _logger;  //微软的没有将日志写入文件中
        public TestController(ILogger<TestController> logger)
        {
            _logger = logger;
        }


        [HttpGet]
        public IEnumerable<string> Get()
        {
            _logger.LogDebug("ssss");  //这里是nlog,因为config中使用了nlog 
            return new string[] { "value1", "value2" };
        }



    }
}